package xtable;

// typed table access point
public class User {
	User() {
	}

	public static void firstInsert(Long key, xbean.User value) throws Exception {
		_Tables_.getInstance().user.firstInsert(key, value);
	}

	public static xbean.User get(Long key) throws Exception {
		return _Tables_.getInstance().user.get(key);
	}

	public static xbean.User get(Long key, xbean.User value) throws Exception {
		return _Tables_.getInstance().user.get(key, value);
	}

	public static void insert(Long key, xbean.User value) throws Exception {
		_Tables_.getInstance().user.insert(key, value);
	}

	public static void delete(Long key) throws Exception {
		_Tables_.getInstance().user.delete(key);
	}

	public static boolean add(Long key, xbean.User value) throws Exception {
		return _Tables_.getInstance().user.add(key, value);
	}

	public static boolean remove(Long key) throws Exception {
		return _Tables_.getInstance().user.remove(key);
	}

	public static xdb.TTableCache<Long, xbean.User> getCache() {
		return _Tables_.getInstance().user.getCache();
	}

	public static xdb.TTable<Long, xbean.User> getTable() {
		return _Tables_.getInstance().user;
	}

	public static xbean.User select(Long key) throws Exception {
		return getTable().select(key, new xdb.TField<xbean.User, xbean.User>() {
			public xbean.User get(xbean.User v) {
				return v.toData();
			}
		});
	}

	public static xbean.User selectWithoutCache(Long key) throws Exception {
		return getTable().selectWithoutCache(key, new xdb.TField<xbean.User, xbean.User>() {
			public xbean.User get(xbean.User v) {
				return v.toData();
			}
		});
	}

	public static xbean.User selectWithoutCache4Rollback(Long key) throws Exception {
		return getTable().selectWithoutCache4Rollback(key, new xdb.TField<xbean.User, xbean.User>() {
			public xbean.User get(xbean.User v) {
				return v.toData();
			}
		});
	}

	public static Long selectPrevloginroleid(Long key) throws Exception {
		return getTable().select(key, new xdb.TField<xbean.User, Long>() {
				public Long get(xbean.User v) {
					return v.getPrevloginroleid();
				}
			});
	}

	public static java.util.List<Long> selectIdlist(Long key) throws Exception {
		return getTable().select(key, new xdb.TField<xbean.User, java.util.List<Long>>() {
				public java.util.List<Long> get(xbean.User v) {
					return v.getIdlistAsData();
				}
			});
	}

}
